import type { FC } from 'react';
import ItemRender from './render';
import PostItemContext from './context';
import type { PostItemProps } from './types';

const PostItem: FC<PostItemProps> = (props) => {
  const { postDetails: details } = props;

  return (
    <PostItemContext.Provider value={{ details }}>
      <ItemRender />
    </PostItemContext.Provider>
  );
}

export default PostItem;